<?php $this->context->layout = 'form';?>
<?= \common\widgets\Asset::widget(['type'=>['viewer']])?>
<form class="form-horizontal m" id="form-admin-add">
    <table class="table table-striped">
        <?php if ($model['campus_id']):?>
            <tr>
                <th>申请校区</th>
                <td><?=$model['campus_name']?></td>
            </tr>
            <tr>
                <th>打款微信</th>
                <td><?=$userHtml?></td>
            </tr>
            <?php else:?>
            <tr>
                <th>申请人</th>
                <td><?=$userHtml?></td>
            </tr>
        <?php endif;?>
        <tr>
            <th>订单号</th>
            <td>
                <?=$model['orderid']?>
            </td>
        </tr>
        <tr>
            <th>提现金额</th>
            <td><?=$model['amount']?></td>
        </tr>
        <tr>
            <th>手续费</th>
            <td><?=$model['fee']?></td>
        </tr>
        <tr>
            <th><span style="color: red">打款金额</span></th>
            <td>
                <div style="color: red;font-size: 23px"><?=$model['payment_amount']?></div>
                <span class="help-block m-b-none" style="font-size: inherit;"><i class="fa fa-info-circle"></i> 打款金额为我方需要支付的金额</span>
            </td>
        </tr>
        <tr>
            <th>提现方式</th>
            <td><?=$model['way_title']?></td>
        </tr>
        <?php if ($model['way']==1):?>
            <tr>
                <th>收款人</th>
                <td><?=$model['collection_info']['username']??''?></td>
            </tr>
            <tr>
                <th>微信号</th>
                <td><?=$model['collection_info']['wechat_number']??''?></td>
            </tr>
            <tr>
                <th>手机号</th>
                <td><?=$model['collection_info']['phone']??''?></td>
            </tr>
            <tr>
                <th>收款码</th>
                <td><img src="<?=$model['collection_info']['collection_code']??''?>" alt="" style="width: 100px"></td>
            </tr>
        <?php endif;?>
        <?php if ($model['review_status']!==0):?>
            <tr>
                <th>审核状态</th>
                <td>
                    <?=$review_status[$model['review_status']]??''?>
                </td>
            </tr>
            <tr>
                <th>审核备注</th>
                <td>
                    <?=$model['review_remarks']?>
                </td>
            </tr>
            <tr>
                <th>审核时间</th>
                <td>
                    <?=$model['review_time']?>
                </td>
            </tr>
            <?php else:?>
                <tr>
                    <th style="text-align: unset;" class="control-label is-required">审核</th>
                    <td>
                        <?= \common\widgets\FormInput::widget(['name'=>'radio','extend'=>['name'=>'review_status','required'=>1,'data'=>$review_status]])?>
                    </td>
                </tr>
                <tr>
                    <th>审核备注</th>
                    <td>
                        <?= \common\widgets\FormInput::widget(['name'=>'textarea','extend'=>['name'=>'review_remarks']])?>
                    </td>
                </tr>
        <?php endif;?>
    </table>
    <input type="hidden" name="id" value="<?=$model['id']?>">
</form>

<?php $this->beginBlock('script'); ?>
<script>
    new Viewer(document.getElementById('id_card'),{navbar:false,title:false});
    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save("<?=\yii\helpers\Url::to(['running/review'])?>", $('#form-admin-add').serialize());
        }
    }
</script>
<?php $this->endBlock(); ?>
